function downitWindow(e) 
{
	netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

	try {		
		var browser = gBrowser.mCurrentBrowser;
		var doc = browser.contentDocument;

		var the_title  = doc.title;
		var all_links  = new Array();  
		var all_images = new Array();  		
		for (var i = 0; i < doc.links.length; i++)   { all_links.push( doc.links[i].href ); }	
		for (var i = 0; i < doc.images.length; i++)  { all_images.push( doc.images[i].src ); }
		
		window.openDialog("chrome://downit/content/downit-window.xul", "downit-window", "chrome,centerscreen", all_images, all_links );
	  
	}
	catch (e) { alert(e); }	  
}